library(tidyverse) library(emmeans) load("~/Sta486Finalmtf83/data/mat125data.rda")
# data becomes more normal when we drop test scores that are zero # also working with actual tests not pre, practice, honors code or learning aids mat125data <- filter( mat125data, score != 0 & practice_test == 0 & learning_aid == 0 & honors_code == 0 & pre_test == 0) # create precovid data frame, fall of 2019 f19 <- mat125data %>% filter( year == 19 & season == "fall") f19$covid <- "fall 2019, before covid" # create post covid data frame, fall of 2021 f21 <- mat125data %>% filter( year == 21 & season == "fall") f21$covid <- "fall 2021, after covid" # bind the two data frames together for visualization pre_post <- rbind( f19, f21) # order the factors pre_post <- pre_post %>% mutate( covid = fct_relevel( covid, "fall 2019, before covid", "fall 2021, after covid")) # plot ggplot( pre_post, aes( x = module_final, y = score, fill = covid)) + geom_boxplot() + labs( title = "Pre and Post Covid In Person Module Test Scores")
knitr::kable(anova( lm( score ~ covid, pre_post )))
pre_post_model <- lm( score ~ covid, pre_post ) pre_post_model %>% summary() plot(pre_post_model, which = 1:2 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.